<!DOCTYPE html>
<html xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>用户管理</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="css/bootstrapSwitch.css?v=3.3.5" rel="stylesheet">
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="css/plugins/datetime/bootstrap-datetimepicker.css"/>
    <link href="css/plugins/zTreeStyle/zTreeStyle.css" rel="stylesheet">
    <link href="css/checkbox3.min.css" rel="stylesheet">
    <link href="css/jquery.orgchart.css" rel="stylesheet">
    <!-- jqgrid-->
    <link href="css/plugins/jqgrid/ui.jqgrid.css?0820" rel="stylesheet">
    <link href="css/plugins/chosen/chosen.css" rel="stylesheet">
    <link rel="stylesheet" href="css/multiple-select.css"/>
    <link href="css/style.css?v=4.0.0" rel="stylesheet">
    <link href="css/index_jqjh.css" rel="stylesheet">
    <link rel="stylesheet" href="css/zTreeStyle/metro.css"/>
    <style>
        h3 {
            line-height: 48px;
            padding-left:16px;
            background-color: #F0F0F0;
            margin:0 -11px;
        }
        .clearBoth {
            clear: both;
        }
        .margin {
            margin-right: 78px;
        }
        [v-cloak] {
            display: none;
        }
    </style>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="col-sm-3">

    </div>
    <div class="col-sm-9" style="width: 100%;margin-left: 0;">
        <div class="ibox-content">
            <div id="orgChart-wrap-1">

            </div>
        </div>

        <div id="vue-temp-1" v-cloak>
            <div class="addWrap" v-show="type=='add'" :add-id="addId">
                <div class="ibox-title">
                    <h5 style="font-size: 16px">新增</h5>
                    <button class="btn btn-primary btn-sm btn-add" v-on:click="add_save">保存</button>
                </div>
               
                <div class="ibox-content databaseSelectedWrap">
                    <h3>基本信息创建：</h3>
                    <div role="form" class="clearfix">
                        <div class="form-group inline" type="units"  itemIdName="unitId">
                            <label>单位：</label>
                            <select class="chosen-select block" style="display: none;" ref="unitsAllSelecte">
                              <option value="">--未选择--</option>
                              <option v-for="i in unitsAll" :value="i.unitId" :selected="i.selected">{{i.unitName}}</option>
                            </select>
                        </div>
                        <div class="form-group inline" type="viewName" itemIdName="viewNameId">
                            <label>视图名称：</label>
                            <select class="multiple-select block" ref="viewName" style="display: none;" multiple>
                                <option selected="selected" disabled="disabled" value="JJdb">接警</option>
                                <option value="CJdb">处警</option>
                                <option value="FKdb">反馈</option>
                            </select>
                        </div>
                        <div class="form-group inline" type="viewUserName">
                            <label>用户名：</label>
                            <input class="form-control" placeholder="必填，用户名以字母开头" :value="addItems.viewUserName"  v-on:input="valueChange">
                        </div>
                        <div class="form-group inline" type="viewPassword">
                            <label>密码：</label>
                            <input class="form-control" placeholder="必填，密码最短为六位数" :value="addItems.viewPassword"   v-on:input="valueChange">
                        </div>
                        <div class="form-group w100p" type="comments">
                            <label>基本信息：</label>
                            <input class="form-control" placeholder="请输入基本信息" :value="addItems.comments" v-on:input="valueChange">
                        </div>

                        <h3 class="clearBoth">创建视图条件：</h3>

                        <div class="form-group inline margin" type="caseTypes" itemIdName="caseTypeId">
                            <label>案件类型：</label>
                            <select class="multiple-select caseTypesSelectHock block" ref="caseTypesAll" multiple data-placeholder="">
                                <option v-for="i in caseTypesAll" :selected="i.selected" :value="i.id" :key="i.id">{{i.typeName}}</option>
                            </select>
                        </div>
                        <div class="form-group inline margin" type="caseClasses" itemIdName="caseClassId">
                            <label>案件类别：</label>
                            <select class="multiple-select caseClassesSelectHock block" ref="caseClassesAll" multiple data-placeholder="">
                                <option v-for="i in caseClassesAll" :selected="i.selected" :value="i.id" :key="i.id">{{i.typeName}}</option>
                            </select>
                        </div>
                        <div class="form-group inline margin" type="caseSmallClasses" itemIdName="caseSmallClassId">
                            <label>案件细类：</label>
                            <select class="multiple-select caseSmallClassesSelectHock block" multiple ref="caseSmallClassesAll" data-placeholder="">
                                <option v-for="i in caseSmallClassesAll" :selected="i.selected" :value="i.id" :key="i.id">{{i.typeName}}</option>
                            </select>
                        </div>
                        <div class="form-group inline clearBoth margin" type="alarmCalls" itemName="alarmCall">
                            <label>报警电话：</label>
                            <div class="event-add-wrap">
                                <input class="form-control alarmCalls" />
                                <a class="btn btn-primary" v-on:click="add_addOne">添加</a>
                            </div>
                            <div class="databaseSelected-wrap">
                                <label class="selected-condition">已有条件：</label>
                                <ul>
                                    <li v-for="(i, index) in addItems.alarmCalls">{{ i.alarmCall }}
                                        <i class="fa fa-times-circle" v-on:click="delete_selectAdd(addItems.alarmCalls, index,'alarmCalls')"></i>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="form-group inline margin" type="caseAddrs" itemName="caseAddrKeywords">
                            <label>案发地址：</label>
                            <div class="event-add-wrap">
                                <input class="form-control caseAddrs" />
                                <a class="btn btn-primary" v-on:click="add_addOne">添加</a>
                            </div>
                            <div class="databaseSelected-wrap">
                                <label class="selected-condition">已有条件：</label>
                                <ul>
                                    <li v-for="(i, index) in addItems.caseAddrs">{{ i.caseAddrKeywords }}
                                        <i class="fa fa-times-circle" v-on:click="delete_selectAdd(addItems.caseAddrs,index,'caseAddrs')"></i>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="form-group inline margin" type="caseContents" itemName="caseContentKeywords">
                            <label>警情内容：</label>
                            <div class="event-add-wrap">
                                <input class="form-control caseContents" />
                                <a class="btn btn-primary" v-on:click="add_addOne">添加</a>
                            </div>
                            <div class="databaseSelected-wrap">
                                <label class="selected-condition">已有条件：</label>
                                <ul>
                                    <li v-for="(i, index) in addItems.caseContents">{{ i.caseContentKeywords }}
                                        <i class="fa fa-times-circle" v-on:click="delete_selectAdd(addItems.caseContents, index,'caseContents')"></i>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="editWrap" v-show="type=='edit'" :edit-view-id="editViewId">
                <div class="ibox-title">
                    <h5 style="font-size: 16px">编辑</h5>
                    <button class="btn btn-primary btn-sm btn-save" v-on:click="tempSave">保存</button>
                </div>
                <div class="ibox-content databaseSelectedWrap">
                    <h3>基本信息创建：</h3>
                    <div role="form" class="clearfix">
                        <div class="form-group inline" type="units" itemIdName="unitId">
                            <label>单位：</label>
                            <div>{{editItems._unitName}}</div>
                        </div>
                        <div class="form-group inline" type="viewName" >
                            <label>视图名称：</label>
                            <select class="multiple-select block" ref="editViewName" style="display: none;" multiple>
                                <option selected="selected" disabled="disabled"  value="JJdb">接警</option>
                                <option value="CJdb" :selected="editItems.viewName.indexOf('CJdb') != -1">处警</option>
                                <option value="FKdb" :selected="editItems.viewName.indexOf('FKdb') != -1">反馈</option>
                            </select>
            
                        </div>
                        <div class="form-group inline" type="viewUserName">
                            <label>用户名：</label>
                            <input class="form-control" :value="editItems.viewUserName" v-on:input="valueChange" disabled="!editing">
                        </div>
                        <div class="form-group inline" type="viewPassword">
                            <label>密码：</label>
                            <input class="form-control" :value="editItems.viewPassword" v-on:input="valueChange" disabled="!editing">
                        </div>
                        <div class="form-group w100p" type="comments">
                            <label>基本信息：</label>
                            <input class="form-control" :value="editItems.comments" v-on:input="valueChange" >
                        </div>
                        <h3 class="clearBoth">创建视图条件：</h3>
                        <div class="form-group inline margin" type="caseTypes" itemIdName="caseTypeId">
                            <label>案件类型：</label>
                            <select ref="editCaseTypesAll" class="multiple-select block" multiple  style="display: none;">
                                <option v-for="i in caseTypesAll" :value="i.id" :selected="i.selected" ::key="i.id">{{i.typeName}}</option>
                            </select>
                            <div class="databaseSelected-wrap">
                                <label class="selected-condition">已有条件：</label>
                                <ul>
                                    <li v-if="editItems.caseTypes[0] != undefined" v-for="i in editItems.caseTypes">{{ i.typeName }}
                                        <i class="fa fa-times-circle" v-on:click="deleteType(i.id,'caseType')"></i>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="form-group inline margin" type="caseClasses" >
                            <label>案件类别：</label>
                            <select ref="editCaseClassesAll" class="multiple-select block" multiple  style="display: none;">
                                <option v-for="i in caseClassesAll" :value="i.id" :selected="i.selected" ::key="i.id">{{i.typeName}}</option>
                            </select>
                            <div class="databaseSelected-wrap">
                                <label class="selected-condition">已有条件：</label>
                                <ul>
                                    <li v-if="editItems.caseClasses[0] != undefined" v-for="i in editItems.caseClasses" >{{ i.typeName }}
                                        <i class="fa fa-times-circle" v-on:click="deleteType(i.id,'caseClasse')"></i>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="form-group inline margin" type="caseSmallClasses" >
                            <label>案件细类：</label>
                            <select ref="editCaseSmallClassesAll" class="multiple-select block" multiple  style="display: none;">
                                <option v-for="i in caseSmallClassesAll" :value="i.id" :selected="i.selected" ::key="i.id">{{i.typeName}}</option>
                            </select>
                            <div class="databaseSelected-wrap">
                                <label class="selected-condition">已有条件：</label>
                                <ul>
                                    <li v-if="editItems.caseSmallClasses[0] != undefined" v-for="i in editItems.caseSmallClasses" >{{ i.typeName }}
                                        <i class="fa fa-times-circle" v-on:click="deleteType(i.id,'caseSmallClasse')"></i>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="form-group inline clearBoth margin" type="alarmCalls" itemName="alarmCall">
                            <label>报警电话：</label>
                            <div class="event-add-wrap">
                                <input class="form-control alarmCalls"  />
                                <a class="btn btn-primary" v-on:click="edit_addOne" >添加</a>
                            </div>
                            <div class="databaseSelected-wrap">
                                <label class="selected-condition">已有条件：</label>
                                <ul>
                                    <li v-for="i in editItems.alarmCalls">{{ i.alarmCall }}
                                        <i class="fa fa-times-circle" v-on:click="delete_select1(i,editItems.alarmCalls,'alarmCalls')"></i>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="form-group inline margin" type="caseAddrs" itemName="caseAddrKeywords">
                            <label>案发地址：</label>
                            <div class="event-add-wrap">
                                <input class="form-control caseAddrs"  />
                                <a class="btn btn-primary" v-on:click="edit_addOne" >添加</a>
                            </div>
                            <div class="databaseSelected-wrap">
                                <label class="selected-condition">已有条件：</label>
                                <ul>
                                    <li v-for="i in editItems.caseAddrs">{{ i.caseAddrKeywords }}
                                        <i class="fa fa-times-circle" v-on:click="delete_select1(i,editItems.caseAddrs,'caseAddrs')"></i>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="form-group inline margin" type="caseContents" itemName="caseContentKeywords">
                            <label>警情内容：</label>
                            <div class="event-add-wrap">
                                <input class="form-control caseContents"  />
                                <a class="btn btn-primary" v-on:click="edit_addOne" >添加</a>
                            </div>
                            <div class="databaseSelected-wrap">
                                <label class="selected-condition">已有条件：</label>
                                <ul>
                                    <li v-for="i in editItems.caseContents">{{ i.caseContentKeywords }}
                                        <i class="fa fa-times-circle" v-on:click="delete_select1(i,editItems.caseContents,'caseContents')"></i>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
    </div>
</div>
            
        </div>
    </div>
    <!-- 全局js -->
    <script src="js/jquery.min.js?v=2.1.4"></script>
    <script src="js/bootstrap.min.js?v=3.3.5"></script>
    <script src="js/bootstrapSwitch.js?v=3.3.5"></script>
    <script src="js/vue.js?v=1.0.0"></script>

    <!-- 自定义js -->
    <script src="js/content.js?v=1.0.0"></script>
    <script src="js/plugins/datetime/bootstrap-datetimepicker.js"></script>

    <!-- Bootstrap-Treeview plugin javascript -->
    <!--<script src="js/plugins/treeview/bootstrap-treeview.js"></script>
    <script src="js/demo/treeview-demo.js"></script>-->
    <!-- jqGrid -->
    <script src="js/plugins/jqgrid/i18n/grid.locale-cn.js?0820"></script>
    <script src="js/plugins/jqgrid/jquery.jqGrid.min.js?0820"></script>
    <script type="text/javascript" src="js/jquery.serializejson.js"></script>

    <script src="js/plugins/validate/jquery.validate.min.js"></script>
    <script src="js/plugins/validate/messages_zh.min.js"></script>

    <script type="text/javascript" src="js/plugins/chosen/chosen.jquery.js"></script>
    <script type="text/javascript" src="js/multiple-select.js"></script>

    <script src="js/jquery.orgchart.js"></script>
    <script src="js/plugins/layer/layer.min.js"></script>
    <script type="text/javascript" src="js/jqPaginator.js"></script>
    <script src="js/common/config.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/demo/form-validate-demo.js"></script>
    <script type="text/javascript" src="js/controllerJs/index_jqjh_2.js"></script>
    <script type="text/javascript" src="js/common/ztreeDept.js"></script>
</div>
</body>

</html>
